package com.example.pharmacy.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: asus
 * Date: 2024-12-21
 * Time: 15:19
 */
@Data
public class OrderInfo {
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Integer orderId;
    private Integer userId;
    private String consignee;//收件人
    private String tele;
    private String address;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private BigDecimal totalAmount;
    private String orderStatus;
    private Integer isDeleted;
    private Date createTime;
    private Date updateTime;
    public String getCreateTime() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sdf.format(createTime);
    }

}
